-- GENERATED SPELL FOR [Cabal Assassin] --


function spell0_18636(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(30992,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18636', 589, 1)
end

function spell1_18636(pUnit, Event) --@Stealth,Self--
pUnit:FullCastSpellOnTarget(30991,pUnit)
pUnit:RegisterEvent('Sorts_18636', 0, 1)
end

function Sorts_18636(pUnit, Event)
local choix_sorts_18636 = math.random(0, 1)
if choix_sorts_18636 == 0 then
pUnit:RegisterEvent('spell0_18636', 1, 1)
end
if choix_sorts_18636 == 1 then
pUnit:RegisterEvent('spell1_18636', 1, 1)
end
end

function mob18636_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18636', math.random(1500, 3000), 1)
end

function mob18636_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18636_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18636_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18636, 1, 'mob18636_Action')
RegisterUnitEvent(18636, 2, 'mob18636_Leave')
RegisterUnitEvent(18636, 3, 'mob18636_Kill')
RegisterUnitEvent(18636, 4, 'mob18636_Die')
